<template>
	<view class="wrap">
		<view class="search">
			<u-search v-model="keywords" @custom="search" @search="search"></u-search>
		</view>
		<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="change"></u-tabs>
		<view v-if="current === 0">
			<scroll-view class="scroll-list msg-list-item" scroll-y="true">
				<u-card class="task-list-item" :border="false" padding="20" margin="30rpx 20rpx">
					<view slot="head" style="display: flex;align-items: center;justify-content: space-between;">
						<view style="display: flex;align-items: center;font-size: 30rpx;"><u-avatar class="user-images" size="60" src=""></u-avatar>杨过的学年考核</view><view style="color: #999999;font-size: 22rpx;">2024年10月24日</view>
					</view>
					<view class="" slot="body">
						<u-row gutter="16">
							<u-col span="12">
								<view class="apply-text"><span>打卡天数：</span>15</view>
							</u-col>
							<u-col span="12">
								<view class="apply-text"><span>请假次数：</span>0</view>
							</u-col>
							<u-col span="12">
								<view class="apply-text"><span>获得积分：</span>20</view>
							</u-col>
						</u-row>
					</view>
					<view class="apply-list-foot" slot="foot">
						<u-row gutter="16">
							<u-col span="4" text-align="center">
								<view class="ca-text">差</view>
							</u-col>
							<u-col span="4" text-align="center">
								<view class="liang-text">良</view>
							</u-col>
							<u-col span="4" text-align="center">
								<view class="you-text">优</view>
							</u-col>
						</u-row>
					</view>
				</u-card>
				<u-card class="task-list-item" :border="false" padding="20" margin="30rpx 20rpx">
					<view slot="head" style="display: flex;align-items: center;justify-content: space-between;">
						<view style="display: flex;align-items: center;font-size: 30rpx;"><u-avatar class="user-images" size="60" src=""></u-avatar>郭靖的学年考核</view><view style="color: #999999;font-size: 22rpx;">2024年10月24日</view>
					</view>
					<view class="" slot="body">
						<u-row gutter="16">
							<u-col span="12">
								<view class="apply-text"><span>打卡天数：</span>30</view>
							</u-col>
							<u-col span="12">
								<view class="apply-text"><span>请假次数：</span>2</view>
							</u-col>
							<u-col span="12">
								<view class="apply-text"><span>获得积分：</span>40</view>
							</u-col>
						</u-row>
					</view>
					<view class="apply-list-foot" slot="foot">
						<u-row gutter="16">
							<u-col span="4" text-align="center">
								<view class="ca-text">差</view>
							</u-col>
							<u-col span="4" text-align="center">
								<view class="liang-text">良</view>
							</u-col>
							<u-col span="4" text-align="center">
								<view class="you-text">优</view>
							</u-col>
						</u-row>
					</view>
				</u-card>
				<u-divider>已经到底了</u-divider>
			</scroll-view>
		</view>
		<u-divider>已经到底了</u-divider>
	</view>
</template>

<script>
export default {
	data() {
		return {
			keywords: '',
			tabList: [{
				name: '待审核'
			}, {
				name: '已审核',
			},{
				name: '全部',
			}],
			current: 0,
			scrollTop: 0,
			indexList: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",
				"T", "U",
				"V", "W", "X", "Y", "Z"
			],
			nameList: ['林逸飞', '李晨曦', '白飞', '百威',],
			deptList: ['勤工俭学'],
			imageList: ['user01', 'user02', 'user03', 'user04', 'user05', 'user06'],
		}
	},
	methods: {
		search() {
			
		},
		change(index) {
			this.current = index;
		},
		getRandomInt(min, max) {
			let data = Math.floor(Math.random() * (max - min + 1)) + min;
			return data;
		},
		getRandomName() {
			const length = this.nameList.length;
			const i = this.getRandomInt(0, length - 1);
			return this.nameList[i];
		},
		getRandomDept() {
			const length = this.deptList.length;
			const i = this.getRandomInt(0, length - 1);
			return this.deptList[i];
		},
		getReandomImage(i) {
			// return '/static/aidex/images/' + this.imageList[i] + '.png';
			return;
		},
	}
}
</script>

<style>
@import '../../../common/uni.css';
page {
	background-color: #f5f5f5;
}

.wrap .search{
	background: #ffffff;
}	

.list-cell {
	display: flex;
	box-sizing: border-box;
	width: 100%;
	padding: 8px 24rpx;
	overflow: hidden;
	color: #323233;
	font-size: 14px;
	line-height: 24px;
	background-color: #fff;
	align-items: center;
	border-bottom: 1px solid #ececec !important;
}

.user-images {
	width: 80rpx;
	height: 80rpx;
	margin-right: 10px;
}

.user-name {
	font-size: 32rpx;
	color: #000000;
	flex: 1;

	span {
		display: block;
	}

	.user-other {
		font-size: 26rpx;
		color: #999999;
		font-weight: normal;
	}
}

.ca-text{
	color: #ff4400;
}

.liang-text{
	color: #4094ff;
}

.you-text {
	color: #58ca93;
}

.apply-text{
	font-size: 28rpx;
	color: #333333;
	span{
		color: #999999;
	}
}
</style>